<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<h2>${domainVariable} list</h2>

<form id="form" name="form" method="get" action="/${domainVariable}/list.html">
<table>
	<tr>
		<th>키워드</th>
		<td><input type="text" name="keyword" value="${r"${search.keyword}"}" /></td>
		<td><input type="submit" value="검색"/></td>
	</tr>
</table>
</form>

<table>
	<tr>
		<#list fieldMappers as fieldMapper>
		<th>${fieldMapper.fieldName}</th>
		</#list>		
	</tr>
	<c:forEach items="${r"${"}${domainVariable}List}" var="each">
	<tr>
		<#list fieldMappers as fieldMapper>
		<#if fieldMapper_index == 0>
		<td><a href="/${domainVariable}/view.html?id=${r"${each.id}"}">${r"${each."}${fieldMapper.fieldName}}</a></td>
		</#if>
		<#if fieldMapper_index != 0>
		<td>${r"${each."}${fieldMapper.fieldName}}</td>
		</#if>
		</#list>
	</tr>	
	</c:forEach>
</table>
<div>
<p><a href="/${domainVariable}/form.html">등록</a></p>
</div>